import http from '@/utils/request'

/**
 * @author hhl
 * @argument 传一个JSON字符串过去包含Key value
 * @description 用户登录请求接口
 * @callback 返回一个JSON格式的结果
 * @requires false
 */
export const UserLogin = form => http.post('api/user/login',form)
/* export const UserLogin = data => http.post({
  url:'/api/user/login',
  data,
  headers:{
    'Content-Type':'application/json;charset=UTF-8'
  }
}) */

/**
 * @author hhl
 * @argument 传一个JSON字符串过去包含Key value
 * @description 用户注册接口
 * @callback 返回boolean
 * @requires false
*/
export const UserRegister = form => http.post('api/user/register',JSON.stringify(form))

/**
 * @author hhl
 * @description 
 * @callback 返回boolean
*/
export const UserRoleSuperAdmin = () => http.post('api/user/roleSuperAdmin')

/**
 * @author hhl
 * @description 
 * @callback 返回boolean
*/
export const UserPermissionsseCreate = () => http.post('api/user/permissionsse:create')

/**
 * @author hhl
 * @description 
 * @callback 返回boolean
*/
export const UsergetUser = () => http.post('api/user/user')

/**
 * @author hhl
 * @description 
 * @callback 返回boolean
*/
export const UserGuest = () => http.post('api/user/guest')